<div id="modal1" class="modal modal-fixed-footer">
  <div *ngIf="type == 'login'">
    <div class="modal-content">
      <h4 class="center">登陆</h4>
      <form class="row">
        <div class="input-field col s12">
          <i class="material-icons prefix">account_circle</i>
          <input id="username" type="text" [(ngModel)]="username" name="username">
          <label for="username">用户名</label>
        </div>
        <div class="input-field col s12">
          <i class="material-icons prefix">polymer</i>
          <input id="password" type="password" [(ngModel)]="password" name="username">
          <label for="password">密码</label>
        </div>
      </form>
        <div class="red lighten-4 center">{{info}}</div>
    </div>
    <div class="modal-footer">
      <a (click)="tryLogin()" class="modal-action modal-close waves-effect waves-green btn-flat">登入</a>
      <a (click)="closeLogin()" class="modal-action modal-close waves-effect waves-green btn-flat">关闭</a>
    </div>
  </div>
</div>
  <app-toast [msg]="msg"></app-toast>